package com.darthsith.droidathome.core.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * This class is a model for a generic Sensor
 * 
 * @author andrea
 *
 */

@Entity
@Table(name="SENSOR")
public class Sensor {

	@Id
	@Column(name="IPADDRESS")
	private String ipAddress;
	@Id
	@Column(name="PIN")
	private int pin;
	@Column(name="NAME")
	private String name;
	@Column(name="TYPE")
	private String type;
	@Column(name="STATUS")
	private String status;
	@Column(name="VALUE")
	private String value;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}
	public String getIpAddress() {
		return ipAddress;
	}
	public void setPin(int pin) {
		this.pin = pin;
	}
	public int getPin() {
		return pin;
	}
	
	@Override
	public String toString() {
		return name+" "+type+" "+status;
	}
}
